package edu.gdkm.ssm.domain;

import java.util.UUID;

/**
 * 旅客实体类
 */
public class Traveller {

    private String id;
    private String name;
    private String sex;
    private String phoneNum;
    private Integer credentialsType;
    private String credentialsTypeStr;
    private String credentialsNum;
    private Integer travellerType;
    private String travellerTypeStr;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getPhoneNum() {
        return phoneNum;
    }

    public void setPhoneNum(String phoneNum) {
        this.phoneNum = phoneNum;
    }

    public Integer getCredentialsType() {
        return credentialsType;
    }

    public void setCredentialsType(Integer credentialsType) {
        this.credentialsType = credentialsType;
    }

    public String getCredentialsTypeStr() {
        if(credentialsType != null){
            switch (credentialsType){
                case 0:
                    this.credentialsTypeStr = "身份证";
                    break;
                case 1:
                    this.credentialsTypeStr = "护照";
                    break;
                case 2:
                    this.credentialsTypeStr = "军官证";
                    break;
            }
        }
        return credentialsTypeStr;
    }

    public void setCredentialsTypeStr(String credentialsTypeStr) {
        if(credentialsTypeStr != null && !"".equals(credentialsTypeStr)){
            switch (credentialsTypeStr){
                case "身份证":
                    this.credentialsType = 0;
                    break;
                case "护照":
                    this.credentialsType = 1;
                    break;
                case "军官证":
                    this.credentialsType = 2;
                    break;
            }
        }
        this.credentialsTypeStr = credentialsTypeStr;
    }

    public String getCredentialsNum() {
        return credentialsNum;
    }

    public void setCredentialsNum(String credentialsNum) {
        this.credentialsNum = credentialsNum;
    }

    public Integer getTravellerType() {
        return travellerType;
    }

    public void setTravellerType(Integer travellerType) {
        this.travellerType = travellerType;
    }

    public String getTravellerTypeStr() {
        if(travellerType != null){
            switch (travellerType){
                case 0:
                    this.credentialsTypeStr = "成人";
                    break;
                case 1:
                    this.credentialsTypeStr = "儿童";
                    break;
            }
        }
        return travellerTypeStr;
    }

    public void setTravellerTypeStr(String travellerTypeStr) {
        if(travellerTypeStr != null && !"".equals(travellerTypeStr)){
            switch (travellerTypeStr){
                case "成人":
                    this.travellerType = 0;
                    break;
                case "儿童":
                    this.travellerType = 1;
                    break;
            }
        }
        this.travellerTypeStr = travellerTypeStr;
    }
}
